// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Axios from 'axios'
import store from './store'
import App from './App'
import router from './router'
import layer from 'vue-layer'



import BootstrapVue from 'bootstrap-vue'

import 'url-search-params-polyfill'

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'

Vue.config.productionTip = false

Axios.defaults.headers.common['Authorization'] = 'Authorization'

// Axios.interceptors.request.use((config)=>{console.log(config)})
// Axios.interceptors.response.use((resp)=>{console.log(resp)})
// Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
Vue.prototype.$http=Axios
// Vue.prototype.$vue=Vue
Vue.prototype.$layer = layer(Vue, {
  msgtime: 3
});

Vue.use(BootstrapVue)

// Vue.component("authorize", (resolve) => {
//   require(['./components/subs/Authorize'], resolve)
// })
Vue.prototype.go = function (name) {
  this.$router.push({name: name})
}
/* eslint-disable no-new */
var  app = new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>',
  store
})

